package com.my.controller;

import com.my.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {

    @Autowired
    private String str;

    @RequestMapping("/hello")
    public String hello(){
        System.out.println(str);
        return "hello";
    }

    @RequestMapping("/ajax")
    @ResponseBody
    public User ajaxTest(){
        return new User();
    }

}
